﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:myBoard="clr-namespace:myBoard" x:Class="myBoard.Framework.ImageLoader"
    Width="181" Height="131" Background="{x:Null}">
	<UserControl.Resources>
		<Style x:Key="ButtonFocusVisual">
			<Setter Property="Control.Template">
				<Setter.Value>
					<ControlTemplate>
						<Rectangle SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="2"/>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#F3F3F3" Offset="0"/>
			<GradientStop Color="#EBEBEB" Offset="0.5"/>
			<GradientStop Color="#DDDDDD" Offset="0.5"/>
			<GradientStop Color="#CDCDCD" Offset="1"/>
		</LinearGradientBrush>
		<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
		<Style x:Key="_waitLogoStyle" TargetType="{x:Type Button}">
			<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
			<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
			<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<Canvas Width="40" Height="40">
							<Grid RenderTransformOrigin="0.5,0.5" x:Name="grid" Width="10" Height="40" Canvas.Left="15">
								<Grid.RenderTransform>
									<TransformGroup>
										<ScaleTransform ScaleX="0.8" ScaleY="0.8"/>
										<SkewTransform AngleX="0" AngleY="0"/>
										<RotateTransform Angle="0"/>
										<TranslateTransform X="0" Y="0"/>
									</TransformGroup>
								</Grid.RenderTransform>
								<Grid RenderTransformOrigin="0.5,0.5" Width="Auto" Height="Auto">
									<Grid.RenderTransform>
										<TransformGroup>
											<ScaleTransform ScaleX="1" ScaleY="1"/>
											<SkewTransform AngleX="0" AngleY="0"/>
											<RotateTransform Angle="-45"/>
											<TranslateTransform X="0" Y="0"/>
										</TransformGroup>
									</Grid.RenderTransform>
									<Ellipse Fill="#CAFFFFFF" Stroke="#FFB7B7B7" StrokeThickness="1" Width="7" Height="9" VerticalAlignment="Top"/>
									<Ellipse Fill="#CAFFFFFF" Stroke="#FFB7B7B7" StrokeThickness="1" Width="7" Height="9" VerticalAlignment="Bottom"/>
								</Grid>
								<Grid RenderTransformOrigin="0.5,0.5" Width="Auto" Height="Auto">
									<Grid.RenderTransform>
										<TransformGroup>
											<ScaleTransform ScaleX="1" ScaleY="1"/>
											<SkewTransform AngleX="0" AngleY="0"/>
											<RotateTransform Angle="-90"/>
											<TranslateTransform X="0" Y="0"/>
										</TransformGroup>
									</Grid.RenderTransform>
									<Ellipse Fill="#CAFFFFFF" Stroke="#FFB7B7B7" StrokeThickness="1" Width="7" Height="9" VerticalAlignment="Top"/>
									<Ellipse Fill="#CAFFFFFF" Stroke="#FFB7B7B7" StrokeThickness="1" Width="7" Height="9" VerticalAlignment="Bottom"/>
								</Grid>
								<Grid RenderTransformOrigin="0.5,0.5" Width="Auto" Height="Auto">
									<Grid.RenderTransform>
										<TransformGroup>
											<ScaleTransform ScaleX="1" ScaleY="1"/>
											<SkewTransform AngleX="0" AngleY="0"/>
											<RotateTransform Angle="-135"/>
											<TranslateTransform X="0" Y="0"/>
										</TransformGroup>
									</Grid.RenderTransform>
									<Ellipse Fill="#CAFFFFFF" Stroke="#FFB7B7B7" StrokeThickness="1" Width="7" Height="9" VerticalAlignment="Top"/>
									<Ellipse Fill="#CAFFFFFF" Stroke="#FFB7B7B7" StrokeThickness="1" Width="7" Height="9" VerticalAlignment="Bottom"/>
								</Grid>
								<Grid Width="Auto" Height="Auto">
									<Ellipse Fill="#CAFFFFFF" Stroke="#FFB7B7B7" StrokeThickness="1" VerticalAlignment="Top" Width="7" Height="9"/>
									<Ellipse Fill="#CAFFFFFF" Stroke="#FFB7B7B7" StrokeThickness="1" Width="7" Height="9" VerticalAlignment="Bottom"/>
								</Grid>
							</Grid>
						</Canvas>
						<ControlTemplate.Triggers>
							<Trigger Property="IsKeyboardFocused" Value="true"/>
							<Trigger Property="ToggleButton.IsChecked" Value="true"/>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="#ADADAD"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Storyboard x:Key="ShowImage">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_loadingImage" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
    <Grid x:Name="_root">

      <Image Visibility="Visible" HorizontalAlignment="Center" x:Name="_loadingImage" VerticalAlignment="Center" Width="Auto" Stretch="UniformToFill" Opacity="0"/>
      <myBoard:Loader HorizontalAlignment="Center" x:Name="_loader" VerticalAlignment="Center"/>

    </Grid>
</UserControl>
